package com.tujh.android.designpatterns.Decorator;

/**
 * Created by TUJH on 2016/10/26.
 * <p/>
 * 装饰角色
 */
public class Decorator implements Component {

    private Component component;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void sampleOperation() {
        // 委派给构件
        component.sampleOperation();
        System.out.println("this is Decorator!");
    }
}
